<template>
    <div class="">
       
        <div class="container">
            <my-quill-editor ref="liuhuan" :editContent="ruleForm.content" @editSubmit="getEditSubmit"></my-quill-editor>
            <button type="primary" @click="getContent">保存</button>
        </div>
    </div>
</template>

<script>
	import myQuillEditor  from './myQuillEditor.vue';
	
    export default {
        components: {
			myQuillEditor
        },
        data() {
            return {
                ruleForm: {
                    content: ''
                },
                content: ''
            };
        },
        destroyed() {
        },
        created() {
            this.getSeller();
        },
        mounted() {

        },
        methods: {
            // 提交数据
			getEditSubmit(e){
				this.ruleForm.content = e;
                // this.submitForm();
			},
            // 提交数据，先获取富文本内容
			getContent(){
                this.$refs['liuhuan'].editSubmit()
			},
            //获取商家基本信息
            getSeller() {
                this.ajax('/seller/seller', {}).then(res => {
                    if (res.success) {
                        this.ruleForm = {
                            content: res.result.introduce //店铺介绍
                        }
                    }
                });
            },
            // 提交数据
            submitForm(){
            },
        }
    };
</script>
<style lang="less" scoped>
    .color_999 {
        color: #999;
    }

    .color-409EFF {
        color: #409EFF;
    }

    .avatar-uploader {

    .el-upload {
        border: 1px dashed #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        overflow: hidden;

    &
    :hover {
        border-color: #409eff;
    }

    }
    .avatar-uploader-icon {
        font-size: 28px;
        color: #8c939d;
        width: 100px;
        height: 100px;
        line-height: 100px;
        text-align: center;
    }

    .avatar {
        width: 100px;
        height: 100px;
        display: block;
    }

    }
    .statement-box {

    p {
        display: inline;
        margin-left: 10px;
        word-wrap: break-word;
    }

    }
</style>
